Integrand size = 26, antiderivative size = 86 \[ \int (e \sec (c+d x))^m (a+i a \tan (c+d x))^5 \, dx=\frac {i 2^{5+\frac {m}{2}} a^5 \operatorname {Hypergeometric2F1}\left (-4-\frac {m}{2},\frac {m}{2},\frac {2+m}{2},\frac {1}{2} (1-i \tan (c+d x))\right ) (e \sec (c+d x))^m (1+i \tan (c+d x))^{-m/2}}{d m} \]
I*2^(5+1/2*m)*a^5*hypergeom([1/2*m, -4-1/2*m],[1+1/2*m],1/2-1/2*I*tan(d*x+ c))*(e*sec(d*x+c))^m/d/m/((1+I*tan(d*x+c))^(1/2*m))
Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(210\) vs. \(2(86)=172\).
Time = 6.42 (sec) , antiderivative size = 210, normalized size of antiderivative = 2.44 \[ \int (e \sec (c+d x))^m (a+i a \tan (c+d x))^5 \, dx=\frac {a^5 (e \sec (c+d x))^m \left (\frac {i \left (16 \left (8+6 m+m^2\right )-12 m (4+m) \sec ^2(c+d x)+m (2+m) \sec ^4(c+d x)\right )}{8+6 m+m^2}+5 \cot (c+d x) \operatorname {Hypergeometric2F1}\left (-\frac {3}{2},\frac {m}{2},\frac {2+m}{2},\sec ^2(c+d x)\right ) \sqrt {-\tan ^2(c+d x)}+10 \cot (c+d x) \operatorname {Hypergeometric2F1}\left (-\frac {1}{2},\frac {m}{2},\frac {2+m}{2},\sec ^2(c+d x)\right ) \sqrt {-\tan ^2(c+d x)}+\cot (c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {m}{2},\frac {2+m}{2},\sec ^2(c+d x)\right ) \sqrt {-\tan ^2(c+d x)}\right )}{d m} \]
(a^5*(e*Sec[c + d*x])^m*((I*(16*(8 + 6*m + m^2) - 12*m*(4 + m)*Sec[c + d*x ]^2 + m*(2 + m)*Sec[c + d*x]^4))/(8 + 6*m + m^2) + 5*Cot[c + d*x]*Hypergeo metric2F1[-3/2, m/2, (2 + m)/2, Sec[c + d*x]^2]*Sqrt[-Tan[c + d*x]^2] + 10 *Cot[c + d*x]*Hypergeometric2F1[-1/2, m/2, (2 + m)/2, Sec[c + d*x]^2]*Sqrt [-Tan[c + d*x]^2] + Cot[c + d*x]*Hypergeometric2F1[1/2, m/2, (2 + m)/2, Se c[c + d*x]^2]*Sqrt[-Tan[c + d*x]^2]))/(d*m)
Time = 0.47 (sec) , antiderivative size = 88, normalized size of antiderivative = 1.02, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {3042, 3986, 3042, 4006, 80, 79}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (a+i a \tan (c+d x))^5 (e \sec (c+d x))^m \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (a+i a \tan (c+d x))^5 (e \sec (c+d x))^mdx\) |
\(\Big \downarrow \) 3986 |
\(\displaystyle (a-i a \tan (c+d x))^{-m/2} (a+i a \tan (c+d x))^{-m/2} (e \sec (c+d x))^m \int (a-i a \tan (c+d x))^{m/2} (i \tan (c+d x) a+a)^{\frac {m+10}{2}}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle (a-i a \tan (c+d x))^{-m/2} (a+i a \tan (c+d x))^{-m/2} (e \sec (c+d x))^m \int (a-i a \tan (c+d x))^{m/2} (i \tan (c+d x) a+a)^{\frac {m+10}{2}}dx\) |
\(\Big \downarrow \) 4006 |
\(\displaystyle \frac {a^2 (a-i a \tan (c+d x))^{-m/2} (a+i a \tan (c+d x))^{-m/2} (e \sec (c+d x))^m \int (a-i a \tan (c+d x))^{\frac {m-2}{2}} (i \tan (c+d x) a+a)^{\frac {m+8}{2}}d\tan (c+d x)}{d}\) |
\(\Big \downarrow \) 80 |
\(\displaystyle \frac {a^6 2^{\frac {m}{2}+4} (1+i \tan (c+d x))^{-m/2} (a-i a \tan (c+d x))^{-m/2} (e \sec (c+d x))^m \int \left (\frac {1}{2} i \tan (c+d x)+\frac {1}{2}\right )^{\frac {m+8}{2}} (a-i a \tan (c+d x))^{\frac {m-2}{2}}d\tan (c+d x)}{d}\) |
\(\Big \downarrow \) 79 |
\(\displaystyle \frac {i a^5 2^{\frac {m}{2}+5} (1+i \tan (c+d x))^{-m/2} (e \sec (c+d x))^m \operatorname {Hypergeometric2F1}\left (\frac {1}{2} (-m-8),\frac {m}{2},\frac {m+2}{2},\frac {1}{2} (1-i \tan (c+d x))\right )}{d m}\) |
(I*2^(5 + m/2)*a^5*Hypergeometric2F1[(-8 - m)/2, m/2, (2 + m)/2, (1 - I*Ta n[c + d*x])/2]*(e*Sec[c + d*x])^m)/(d*m*(1 + I*Tan[c + d*x])^(m/2))
3.5.50.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(( a + b*x)^(m + 1)/(b*(m + 1)*(b/(b*c - a*d))^n))*Hypergeometric2F1[-n, m + 1 , m + 2, (-d)*((a + b*x)/(b*c - a*d))], x] /; FreeQ[{a, b, c, d, m, n}, x] && !IntegerQ[m] && !IntegerQ[n] && GtQ[b/(b*c - a*d), 0] && (RationalQ[m] || !(RationalQ[n] && GtQ[-d/(b*c - a*d), 0]))
Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(c + d*x)^FracPart[n]/((b/(b*c - a*d))^IntPart[n]*(b*((c + d*x)/(b*c - a*d))) ^FracPart[n]) Int[(a + b*x)^m*Simp[b*(c/(b*c - a*d)) + b*d*(x/(b*c - a*d) ), x]^n, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && !IntegerQ[m] && !Integ erQ[n] && (RationalQ[m] || !SimplerQ[n + 1, m + 1])
Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*( x_)])^(n_.), x_Symbol] :> Simp[(d*Sec[e + f*x])^m/((a + b*Tan[e + f*x])^(m/ 2)*(a - b*Tan[e + f*x])^(m/2)) Int[(a + b*Tan[e + f*x])^(m/2 + n)*(a - b* Tan[e + f*x])^(m/2), x], x] /; FreeQ[{a, b, d, e, f, m, n}, x] && EqQ[a^2 + b^2, 0]
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*tan[(e_.) + ( f_.)*(x_)])^(n_), x_Symbol] :> Simp[a*(c/f) Subst[Int[(a + b*x)^(m - 1)*( c + d*x)^(n - 1), x], x, Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m, n }, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 + b^2, 0]
\[\int \left (e \sec \left (d x +c \right )\right )^{m} \left (a +i a \tan \left (d x +c \right )\right )^{5}d x\]
\[ \int (e \sec (c+d x))^m (a+i a \tan (c+d x))^5 \, dx=\int { {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{5} \left (e \sec \left (d x + c\right )\right )^{m} \,d x } \]
integral(32*a^5*(2*e*e^(I*d*x + I*c)/(e^(2*I*d*x + 2*I*c) + 1))^m*e^(10*I* d*x + 10*I*c)/(e^(10*I*d*x + 10*I*c) + 5*e^(8*I*d*x + 8*I*c) + 10*e^(6*I*d *x + 6*I*c) + 10*e^(4*I*d*x + 4*I*c) + 5*e^(2*I*d*x + 2*I*c) + 1), x)
\[ \int (e \sec (c+d x))^m (a+i a \tan (c+d x))^5 \, dx=i a^{5} \left (\int \left (- i \left (e \sec {\left (c + d x \right )}\right )^{m}\right )\, dx + \int 5 \left (e \sec {\left (c + d x \right )}\right )^{m} \tan {\left (c + d x \right )}\, dx + \int \left (- 10 \left (e \sec {\left (c + d x \right )}\right )^{m} \tan ^{3}{\left (c + d x \right )}\right )\, dx + \int \left (e \sec {\left (c + d x \right )}\right )^{m} \tan ^{5}{\left (c + d x \right )}\, dx + \int 10 i \left (e \sec {\left (c + d x \right )}\right )^{m} \tan ^{2}{\left (c + d x \right )}\, dx + \int \left (- 5 i \left (e \sec {\left (c + d x \right )}\right )^{m} \tan ^{4}{\left (c + d x \right )}\right )\, dx\right ) \]
I*a**5*(Integral(-I*(e*sec(c + d*x))**m, x) + Integral(5*(e*sec(c + d*x))* *m*tan(c + d*x), x) + Integral(-10*(e*sec(c + d*x))**m*tan(c + d*x)**3, x) + Integral((e*sec(c + d*x))**m*tan(c + d*x)**5, x) + Integral(10*I*(e*sec (c + d*x))**m*tan(c + d*x)**2, x) + Integral(-5*I*(e*sec(c + d*x))**m*tan( c + d*x)**4, x))
\[ \int (e \sec (c+d x))^m (a+i a \tan (c+d x))^5 \, dx=\int { {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{5} \left (e \sec \left (d x + c\right )\right )^{m} \,d x } \]
\[ \int (e \sec (c+d x))^m (a+i a \tan (c+d x))^5 \, dx=\int { {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{5} \left (e \sec \left (d x + c\right )\right )^{m} \,d x } \]
Timed out. \[ \int (e \sec (c+d x))^m (a+i a \tan (c+d x))^5 \, dx=\int {\left (\frac {e}{\cos \left (c+d\,x\right )}\right )}^m\,{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^5 \,d x \]